import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';
// 获取设备列表 分页查询 /ITS/SafetyHat/QueryPageList
export const SafetyHatQueryPageList = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取设备详情 /ITS/SafetyHat/QueryHelmetInfo
export const SafetyHatQueryHelmetInfo = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHelmetInfo',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取设备下拉列表 /ITS/SafetyHat/DropDownList
export const SafetyHatDropDownList = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/DropDownList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备 新增 /ITS/SafetyHat/Add
export const SafetyHatAdd = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/Add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备 编辑 /ITS/SafetyHat/Update
export const SafetyHatUpdate = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/Update',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备 删除 /ITS/SafetyHat/Delete
export const SafetyHatDelete = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/Delete',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 查询设备历史轨迹信息 查询 /ITS/SafetyHat/QueryHistoryTracePageList
export const SafetyHatQueryHistoryTracePageList = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHistoryTracePageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备轨迹详细信息 查询 /ITS/SafetyHat/QueryHistoryTraceDetail
export const SafetyHatQueryHistoryTraceDetail = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHistoryTraceDetail',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备历史视频信息 查询 /ITS/SafetyHat/QueryHistoryVideoPageList
export const SafetyHatQueryHistoryVideoPageList = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHistoryVideoPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取key信息 /ITS/SafetyHat/GetKeyInfo
export const SafetyHatGetKeyInfo = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/GetKeyInfo',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取设备历史图片 /ITS/SafetyHat/QueryHistoryImagePageList
export const SafetyHatQueryHistoryImagePageList = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHistoryImagePageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 解析结果 /ITS/SafetyHat/QueryResolveResultPageList
export const SafetyHatQueryResolveResultPageList = (params?: object) => {
	return request({
		// url: '/ITS/SafetyHat/QueryResolveResultPageList',
		url:'ITS/AlgorithmResolveResult/QueryPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 告警信息查询 /ITS/SafetyHat/QueryHelmetAlertInfo
export const SafetyHatQueryHelmetAlertInfo = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHelmetAlertInfo',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 控制设备基础功能动作 /ITS/SafetyHat/OperateDeviceAction
export const SafetyHatOperateDeviceAction = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/OperateDeviceAction',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 下发文字信息到设备 /ITS/SafetyHat/RelayWord
export const SafetyHatRelayWord = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/RelayWord',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 设备详情
export const SafetyHatDetail = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/Get',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取实时视频流地址
export const GetRealMediaUrl = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/GetRealMediaUrl',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 启用或禁用设备
export const OpenOrCloseSafetyHat = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/UpdateDeviceStatus',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 控制设备视频推流
export const OperateStreamStatus = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/OperateStreamStatus',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 手动开启视频流解析
export const ManualResolveStream = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/ManualResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 手动关闭视频流解析
export const stopResolveStream = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/StopResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 查询设备功能状态信息
export const getQueryHelmetFunctionInfoApi = (params?: object) => {
	return request({
		url: '/ITS/SafetyHat/QueryHelmetFunctionInfo',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 分组分页列表获取
export const getQueryGroupPageListApi = (params?: object) => {
	return request({
		url: '/ITS/AlgorithmResolveResult/QueryGroupPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取压缩图片
export const getImageListApi = (params?: object) => {
	return request({
		url: '/ITS/Drone/LoadImage',
		method: 'get',
		params,
		responseType: 'blob',
		multiPartFormData: false
	} as AxiosRequestConfig);
}